]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/ActorFactory.cs
Protoshow sprint.
[rbdr/super-polarity] / Super Polarity / ActorFactory.cs
index 3a2dbabaa5e3a2840b31975591d2e75afcd8613f..f9c7697b2bb2b3b13f3e12db48d176d2215c85b1 100644 (file)
@@ -65,5 +65,80 @@ namespace SuperPolarity
 
             return bullet;
         }
+
+        static public StandardShip CreateScout(Ship.Polarity polarity, Vector2 position)
+        {
+            StandardShip ship = new StandardShip(Game);
+            Texture2D texture;
+
+            if (polarity == Ship.Polarity.Positive)
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\positive-scout");
+            }
+            else if (polarity == Ship.Polarity.Negative)
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\negative-scout");
+            }
+            else
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\neutral-scout");
+            }
+
+            ship.BoxDimensions.X = 10;
+            ship.BoxDimensions.Y = 10;
+            ship.BoxDimensions.W = 10;
+            ship.BoxDimensions.Z = 10;
+
+            ship.Initialize(texture, position);
+            ship.MaxVelocity = 5.2f;
+            ship.FleeVelocity = 6.5f;
+            ship.ChargeVelocity = 5.5f;
+            ship.Value = 3;
+            ship.HP = 0;
+            ship.AngleChangeProbability = 20;
+            ship.SetPolarity(polarity);
+
+            ActorManager.CheckIn(ship);
+
+            return ship;
+        }
+
+        static public StandardShip CreateCruiser(Ship.Polarity polarity, Vector2 position)
+        {
+            StandardShip ship = new StandardShip(Game);
+            Texture2D texture;
+
+            if (polarity == Ship.Polarity.Positive)
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\positive-cruiser");
+            }
+            else if (polarity == Ship.Polarity.Negative)
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\negative-cruiser");
+            }
+            else
+            {
+                texture = Game.Content.Load<Texture2D>("Graphics\\neutral-cruiser");
+            }
+
+            ship.BoxDimensions.X = 40;
+            ship.BoxDimensions.Y = 40;
+            ship.BoxDimensions.W = 40;
+            ship.BoxDimensions.Z = 40;
+
+            ship.Initialize(texture, position);
+            ship.MagneticRadius = 1000;
+            ship.RepelRadius = 200;
+            ship.MaxVelocity = 0.5f;
+            ship.FleeVelocity = 5;
+            ship.ChargeVelocity = 1;
+            ship.Value = 10;
+            ship.HP = 29;
+            ship.SetPolarity(polarity);
+
+            ActorManager.CheckIn(ship);
+
+            return ship;
+        }
     }
 }